@import '@/styles/variables.less';

// 定义主题色变量
@primary-color: #1890ff;
@success-color: #52c41a;
@warning-color: #faad14;
@error-color: #ff4d4f;
@heading-color: rgba(0, 0, 0, 0.75);
@text-color: rgba(0, 0, 0, 0.65);
@text-color-secondary: rgba(0, 0, 0, 0.45);

// 公告栏样式
.announcement-list {
  .ant-list-item {
    padding: 12px 0;
    
    .ant-list-item-meta-title {
      margin-bottom: 4px;
    }
    
    .ant-list-item-meta-description {
      font-size: 12px;
      color: rgba(0, 0, 0, 0.45);
    }
  }
}

// 消息列表样式
.message-list {
  .ant-list-item {
    padding: 12px 0;
    
    .ant-badge {
      margin-right: 8px;
    }
  }
  
  .view-more {
    text-align: center;
    margin-top: 12px;
  }
}

// 进度监控样式
.process-monitor {
  .header {
    margin-bottom: 24px;
  }

  .projectProgress {
    margin-bottom: 32px;

    .projectInfo {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 24px;

      .projectName {
        font-size: 16px;
        font-weight: 500;
        color: rgba(0, 0, 0, 0.85);
      }

      .currentStage {
        color: rgba(0, 0, 0, 0.65);
      }

      .lastUpdate {
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
      }
    }
  }

  .progressSteps {
    :global {
      .ant-steps-item {
        padding-bottom: 24px;
      }

      .ant-steps-item-title {
        font-weight: 500;
      }

      .ant-steps-item-description {
        margin-top: 8px;
      }
    }
  }

  .stageDetail {
    .subStage {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 4px 0;
      
      .subStageTitle {
        color: rgba(0, 0, 0, 0.65);
      }

      .subStageTime {
        font-size: 12px;
        color: rgba(0, 0, 0, 0.45);
      }

      &:hover {
        background: rgba(0, 0, 0, 0.02);
      }
    }
  }
}

// 数据概览样式
.dataOverview {
  margin-bottom: 24px;

  .overviewCard {
    border-radius: 8px;
    transition: all 0.3s;
    border-top: 2px solid transparent;

    :global(.ant-card-body) {
      padding: 12px 16px;
    }

    &:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
  }

  .cardContent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .iconWrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;

    .title {
      color: rgba(0, 0, 0, 0.55);
      font-size: 14px;
    }
  }

  .valueWrapper {
    display: flex;
    align-items: baseline;
    white-space: nowrap;

    .prefix {
      color: rgba(0, 0, 0, 0.45);
      font-size: 14px;
      margin-right: 4px;
    }

    .value {
      font-size: 24px;
      font-weight: 600;
    }

    .suffix {
      color: rgba(0, 0, 0, 0.45);
      font-size: 14px;
      margin-left: 4px;
    }
  }
}

// 办事入口样式
.quickAccess {
  margin-bottom: @margin-lg;
  .base-card();

  .quick-access-button {
    display: flex;
    align-items: center;
    padding: @padding-lg;
    background: linear-gradient(to right, rgba(24, 144, 255, 0.02), rgba(24, 144, 255, 0.08));
    border-radius: @border-radius-base;
    cursor: pointer;
    transition: all 0.3s;
    .hover-scale();

    &:hover {
      background: linear-gradient(to right, rgba(24, 144, 255, 0.05), rgba(24, 144, 255, 0.12));
    }

    .quick-access-icon {
      font-size: 24px;
      color: @primary-color;
      margin-right: @margin-md;
      padding: @padding-md;
      background: rgba(24, 144, 255, 0.1);
      border-radius: 50%;
      transition: all 0.3s;
    }

    .quick-access-content {
      flex: 1;

      .quick-access-title {
        margin: 0 0 8px;
        font-size: 16px;
        font-weight: 500;
        color: @text-color;
      }

      .quick-access-desc {
        margin: 0;
        font-size: 14px;
        color: @text-color-secondary;
      }
    }
  }
}

// 全局文字颜色调整
:global {
  body {
    color: rgba(0, 0, 0, 0.55);
  }

  h1, h2, h3, h4, h5, h6 {
    color: rgba(0, 0, 0, 0.75);
  }

  .ant-card-head-title {
    color: rgba(0, 0, 0, 0.75);
  }

  .ant-table {
    color: rgba(0, 0, 0, 0.55);
  }

  .ant-list-item-meta-title {
    color: rgba(0, 0, 0, 0.75) !important;
  }

  .ant-list-item-meta-description {
    color: rgba(0, 0, 0, 0.45) !important;
  }
} 

// 卡片基础样式
.sectionCard {
  margin-bottom: 24px;
  height: 400px;
  background: linear-gradient(to bottom, #ffffff, #fafafa);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;

  &:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  }

  :global(.ant-card-body) {
    padding: 0;
    height: calc(100% - 57px);
    overflow: hidden;
  }

  :global(.ant-card-head) {
    background: linear-gradient(to right, #f0f5ff, #ffffff);
    border-bottom: 1px solid #f0f0f0;
  }

  :global(.ant-card-head-title) {
    font-size: 16px;
    font-weight: 600;
    color: @heading-color;
  }

  :global(.ant-card-extra) {
    padding: 16px 0;
    
    .ant-btn {
      padding: 4px 0;
      color: @primary-color;

      &:hover {
        color: lighten(@primary-color, 10%);
      }
    }
  }
}

// 进程卡片特殊样式
.processCard {
  height: auto;
  margin-bottom: 0;
  background: linear-gradient(135deg, #f0f5ff 0%, #ffffff 100%);
  border: 1px solid #e6f0ff;

  :global(.ant-card-head) {
    background: linear-gradient(to right, #f0f5ff, #f7faff);
    border-bottom: 1px solid #e6f0ff;
    padding: 0 24px;

    .ant-card-head-title {
      font-size: 18px;
      background: linear-gradient(90deg, #1890ff, #69c0ff);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
  }

  :global(.ant-card-body) {
    height: auto;
    padding: 24px;
  }

  .projectProgress {
    .projectInfo {
      display: flex;
      align-items: center;
      flex-wrap: nowrap;
      gap: 16px;
      margin-bottom: 24px;
      padding: 16px;
      background: linear-gradient(to right, rgba(24, 144, 255, 0.03), transparent);
      border-radius: 8px;

      .infoLeft {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        gap: 16px;
        min-width: 0;

        .projectName {
          font-size: 16px;
          font-weight: 600;
          color: #1890ff;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          max-width: 200px;
          margin: 0;
          padding-right: 16px;
          border-right: 1px solid #e8e8e8;
        }

        .projectCode {
          flex-shrink: 0;
          padding: 4px 12px;
          background: rgba(24, 144, 255, 0.08);
          border-radius: 4px;
          color: #1890ff;
          font-size: 14px;
        }
      }

      .infoCenter {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 8px;

        .currentStage {
          flex-shrink: 0;
          padding: 6px 16px;
          background: linear-gradient(90deg, rgba(24, 144, 255, 0.08), rgba(24, 144, 255, 0.02));
          border-radius: 20px;
          color: #1890ff;
          font-weight: 500;
          white-space: nowrap;
        }

        .stageProgress {
          flex: 1;
          min-width: 100px;
          margin: 0 16px;
          
          :global(.ant-progress-outer) {
            margin: 0;
            padding: 0;
          }
        }
      }

      .infoRight {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        gap: 8px;

        .lastUpdate {
          color: rgba(0, 0, 0, 0.45);
          font-size: 13px;
          white-space: nowrap;
        }
      }
    }
  }

  .progressSteps {
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);

    :global {
      .ant-steps {
        .ant-steps-item {
          &-tail {
            padding: 0 16px;
            &::after {
              background: #f0f0f0;
            }
          }

          &-icon {
            width: 32px;
            height: 32px;
            line-height: 32px;
            text-align: center;
            border-radius: 50%;
            font-size: 16px;
            margin-right: 16px;
            transition: all 0.3s;
          }

          &-content {
            min-width: 0;
            overflow: hidden;
          }

          &-title {
            font-size: 15px;
            font-weight: 500;
            line-height: 32px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }

          &-description {
            margin-top: 12px;
            background: #fafafa;
            border-radius: 8px;
            padding: 12px;
          }
        }
      }
    }
  }

  .stageDetail {
    .subStage {
      display: flex;
      align-items: center;
      padding: 16px 20px;
      margin-bottom: 12px;
      border-radius: 12px;
      background: #fafafa;
      transition: all 0.3s;
      border: 1px solid #f0f0f0;
      position: relative;
      overflow: hidden;

      &::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        border-radius: 2px;
        transition: all 0.3s;
      }

      &.finish::before {
        background: linear-gradient(to bottom, #52c41a, #95de64);
      }

      &.process::before {
        background: linear-gradient(to bottom, #1890ff, #69c0ff);
      }

      &.wait::before {
        background: linear-gradient(to bottom, #d9d9d9, #f0f0f0);
      }

      &.error::before {
        background: linear-gradient(to bottom, #ff4d4f, #ff7875);
      }

      &:hover {
        background: #fff;
        border-color: #e6f7ff;
        transform: translateX(4px);
        box-shadow: 0 2px 8px rgba(24, 144, 255, 0.08);
      }

      .subStageTitle {
        flex: 0 0 200px;
        font-size: 14px;
        font-weight: 500;
        padding: 6px 16px;
        border-radius: 4px;
        margin-right: 24px;
        position: relative;
        display: flex;
        align-items: center;
        white-space: nowrap;

        &::before {
          content: '';
          width: 6px;
          height: 6px;
          border-radius: 50%;
          margin-right: 8px;
          background: currentColor;
          box-shadow: 0 0 0 2px rgba(currentColor, 0.2);
        }

        &.finish {
          color: #52c41a;
          background: rgba(82, 196, 26, 0.08);
        }

        &.process {
          color: #1890ff;
          background: rgba(24, 144, 255, 0.08);
        }

        &.wait {
          color: rgba(0, 0, 0, 0.45);
          background: rgba(0, 0, 0, 0.02);
        }

        &.error {
          color: #ff4d4f;
          background: rgba(255, 77, 79, 0.08);
        }
      }

      .subStageTime {
        flex: 0 0 auto;
        font-size: 13px;
        padding: 4px 12px;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
        display: flex;
        align-items: center;
        white-space: nowrap;
        margin-right: 24px;

        &::before {
          content: '';
          width: 4px;
          height: 4px;
          border-radius: 50%;
          margin-right: 8px;
          background: currentColor;
          opacity: 0.5;
        }

        &.finish {
          color: #52c41a;
          background: rgba(82, 196, 26, 0.04);
        }

        &.process {
          color: #1890ff;
          background: rgba(24, 144, 255, 0.04);
        }

        &.wait {
          color: rgba(0, 0, 0, 0.45);
          background: rgba(0, 0, 0, 0.02);
        }

        &.error {
          color: #ff4d4f;
          background: rgba(255, 77, 79, 0.04);
        }
      }

      .subStageStatus {
        margin-left: auto;
        padding: 4px 16px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 6px;

        &::before {
          font-family: 'anticon';
          font-size: 14px;
        }

        &.finish {
          color: #52c41a;
          background: linear-gradient(45deg, rgba(82, 196, 26, 0.08), rgba(82, 196, 26, 0.04));
          &::before {
            content: '\e64c';
          }
        }

        &.process {
          color: #1890ff;
          background: linear-gradient(45deg, rgba(24, 144, 255, 0.08), rgba(24, 144, 255, 0.04));
          &::before {
            content: '\e640';
          }
        }

        &.wait {
          color: rgba(0, 0, 0, 0.45);
          background: rgba(0, 0, 0, 0.02);
          &::before {
            content: '\e6ae';
          }
        }

        &.error {
          color: #ff4d4f;
          background: linear-gradient(45deg, rgba(255, 77, 79, 0.08), rgba(255, 77, 79, 0.04));
          &::before {
            content: '\e67c';
          }
        }
      }
    }
  }
}

// 列表内容样式
.listContent {
  height: 100%;
  overflow-y: auto;
  padding: 0 24px;

  :global {
    .ant-list-item {
      padding: 16px;
      border-bottom: 1px solid #f0f0f0;
      transition: all 0.3s;

      &:hover {
        background: rgba(24, 144, 255, 0.05);
      }

      &:last-child {
        border-bottom: none;
      }
    }

    .ant-list-item-meta-title {
      margin-bottom: 8px;
      font-size: 14px;
      line-height: 1.5;
      color: @text-color;
    }

    .ant-list-item-meta-description {
      font-size: 12px;
      color: @text-color-secondary;
    }

    .ant-badge-status-dot {
      background: @primary-color;
    }
  }
}

// 项目进度样式优化
.processMonitor {
  .header {
    margin-bottom: 24px;

    :global(.ant-select) {
      .ant-select-selector {
        border-radius: 6px;
        border-color: #d9d9d9;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
        
        &:hover {
          border-color: #40a9ff;
        }
      }
    }
  }

  .projectProgress {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.08);
    margin-bottom: 24px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s;

    &:hover {
      box-shadow: 0 4px 12px rgba(24, 144, 255, 0.12);
      transform: translateY(-2px);
    }

    .projectInfo {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 32px;
      padding-bottom: 16px;
      border-bottom: 1px dashed #e8e8e8;

      .projectName {
        font-size: 18px;
        font-weight: 600;
        background: linear-gradient(90deg, #1890ff, #69c0ff);
        background-clip: text;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        padding-right: 16px;
        position: relative;

        &::after {
          content: '';
          position: absolute;
          right: 0;
          top: 50%;
          transform: translateY(-50%);
          width: 1px;
          height: 16px;
          background: #e8e8e8;
        }
      }

      .projectCode {
        padding: 4px 12px;
        background: rgba(24, 144, 255, 0.08);
        border-radius: 4px;
        color: #1890ff;
        font-size: 14px;
        margin: 0 16px;
      }

      .currentStage {
        padding: 6px 16px;
        background: linear-gradient(90deg, rgba(24, 144, 255, 0.08), rgba(24, 144, 255, 0.02));
        border-radius: 20px;
        color: #1890ff;
        font-weight: 500;
      }

      .lastUpdate {
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
      }
    }
  }

  .progressSteps {
    padding: 0 16px;

    :global {
      .ant-steps-item {
        padding-bottom: 32px;

        &-icon {
          width: 32px;
          height: 32px;
          line-height: 32px;
          text-align: center;
          border-radius: 50%;
          font-size: 16px;
          margin-right: 16px;
          transition: all 0.3s;
        }

        &-content {
          padding-top: 8px;
        }

        &-title {
          font-size: 16px;
          font-weight: 500;
          line-height: 32px;
          transition: color 0.3s;
        }

        &-description {
          padding: 16px;
          background: #fafafa;
          border-radius: 8px;
          margin-top: 16px;
        }

        &-process {
          .ant-steps-item-icon {
            background: #1890ff;
            box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
          }

          .ant-steps-item-title {
            color: #1890ff;
          }
        }

        &-finish {
          .ant-steps-item-icon {
            background: #52c41a;
            box-shadow: 0 4px 12px rgba(82, 196, 26, 0.2);
          }
        }

        &-wait {
          .ant-steps-item-icon {
            background: #f5f5f5;
            color: rgba(0, 0, 0, 0.45);
          }
        }
      }
    }
  }

  .stageDetail {
    .subStage {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 8px 16px;
      border-radius: 4px;
      transition: all 0.3s;
      margin-bottom: 4px;

      &:hover {
        background: rgba(24, 144, 255, 0.04);
      }

      .subStageTitle {
        color: rgba(0, 0, 0, 0.65);
        font-size: 14px;
        display: flex;
        align-items: center;

        &::before {
          content: '';
          width: 6px;
          height: 6px;
          border-radius: 50%;
          background: #1890ff;
          margin-right: 8px;
          opacity: 0.5;
        }
      }

      .subStageTime {
        font-size: 13px;
        color: rgba(0, 0, 0, 0.45);
        padding: 2px 8px;
        background: rgba(0, 0, 0, 0.02);
        border-radius: 10px;
      }
    }
  }
}

// 标签样式优化
.itemFooter {
  .ant-tag {
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 12px;
    border: none;
    
    &-blue {
      background: rgba(24, 144, 255, 0.1);
      color: @primary-color;
    }
    
    &-green {
      background: rgba(82, 196, 26, 0.1);
      color: @success-color;
    }
    
    &-orange {
      background: rgba(250, 173, 20, 0.1);
      color: @warning-color;
    }
  }
}

.announcementList,
.messageList {
  .ant-list-item {
    transition: all 0.3s;
    
    &:hover {
      background: rgba(24, 144, 255, 0.05);
      padding-left: @padding-md;
    }
  }
}

.processMonitor {
  cursor: pointer;
  
  .ant-steps-item {
    &:hover {
      .ant-steps-item-title {
        color: @primary-color;
      }
    }
  }
} 